package cn.bdqn.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * @author Awacky
 * @create 2019-07-27 11:13
 */
@Controller
public class PageController {
    @RequestMapping({"login","/"})
    public String login(){
        return "login";
    }
    @RequestMapping("main")
    public String main(){
        return "main";
    }
    @RequestMapping("logout")
    public String logout(HttpSession session){
        session.invalidate();
        return "redirect:login";
    }
}
